package com.oracle.dao;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.oracle.entity.po.EmployeePO;
import com.oracle.entity.po.SalePO;
import com.oracle.entity.vo.PerformanceDetailVO;
import com.oracle.entity.vo.PerformanceVO;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface EmployeeDao extends BaseMapper<EmployeePO> {

    @Select("SELECT * from VIEW_EMP_PERFORMANCE")
     List<PerformanceVO> getPerformance();

    @Select("SELECT * from VIEW_EMP_PERFORMANCE_DETAIL where id=#{ID}")
     List<PerformanceDetailVO> getPerformanceDetail(@Param("ID") int id);

    @Insert("insert into  sale(employee_id,goods_id,sale_number) values(#{employeeId},#{goodsId},#{saleNum})")
    void insertSale(SalePO salePO);


}